package com.acsior.hibernate.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * OrderNotification entity. @author MyEclipse Persistence Tools <b><i>powered
 * by Belev</i></b>
 */
@Entity
@Table(name = "order_notifications")
@GeneratorKey(tableName = "order_notifications")
public class OrderNotificationVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = -304927565773145614L;

	@Column(name = "error_message", length = 500)
	private String errorMessage;

	@Column(name = "failed", nullable = false)
	private boolean failed;

	@Column(name = "notify_date", length = 23)
	private Date notifyDate;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "order_service_id", nullable = false)
	private OrderServiceVO orderService;

	@Column(name = "sender", nullable = false)
	private boolean sender;

	@Column(name = "sent", nullable = false)
	private boolean sent;

	@Column(name = "sms", nullable = false)
	private boolean sms;

	/** default constructor */
	public OrderNotificationVO() {
		super();
	}

	/** @return the errorMessage */
	public String getErrorMessage() {
		return this.errorMessage;
	}

	/** @return the notifyDate */
	public Date getNotifyDate() {
		return this.notifyDate;
	}

	/** @return the orderService */
	public OrderServiceVO getOrderService() {
		return this.orderService;
	}

	/** @return the failed */
	public boolean isFailed() {
		return this.failed;
	}

	/** @return the sender */
	public boolean isSender() {
		return this.sender;
	}

	/** @return the sent */
	public boolean isSent() {
		return this.sent;
	}

	/** @return the sms */
	public boolean isSms() {
		return this.sms;
	}

	/** @param errorMessage */
	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	/** @param failed */
	public void setFailed(boolean failed) {
		this.failed = failed;
	}

	/** @param notifyDate */
	public void setNotifyDate(Date notifyDate) {
		this.notifyDate = notifyDate;
	}

	/** @param orderService */
	public void setOrderService(OrderServiceVO orderService) {
		this.orderService = orderService;
	}

	/** @param sender */
	public void setSender(boolean sender) {
		this.sender = sender;
	}

	/** @param sent */
	public void setSent(boolean sent) {
		this.sent = sent;
	}

	/** @param sms */
	public void setSms(boolean sms) {
		this.sms = sms;
	}

}